package com.xbkj.pgrp.server.model.app;

import lombok.Getter;
import lombok.Setter;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.jpa.model.BaseModel;
import xyz.erupt.upms.model.base.HyperModel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 角色信息
 */
@Erupt(
        name = "角色信息"
)
@Entity
@Table(name = "pgrp_role")
@Setter
@Getter
public class Role extends HyperModel {
    /**
     * 角色名称
     */
    @EruptField(
            views = @View(title = "角色名称"),
            edit = @Edit(title = "角色名称", notNull = true, search = @Search(vague = true))
    )
    @Column(unique = true, nullable = false)
    private String roleName;
}
